import {request} from "./request"

//获取动态消息:对应网页版网易云，朋友界面里的各种动态消息 ，如分享的视频，音乐，照片等！
export  function event(pagesize, lasttime){
    return request({
        url:"/event",
        withCredentials: true,
        params:{
            pagesize,
            lasttime,
            timestamp:Date.now()
        }
    })
}

//资源 动态 点赞
export function resource_like(type, t ,threadId){
    return request({
        url:"/resource/like",
        withCredentials: true,
        params:{
            type,
            t,
            threadId
        }
    })
}

//获取用户详情
export function user_detail(uid){
    return request({
        url:"/user/detail",
        withCredentials: true,
        params:{
            uid
        }
    })
}
//获取用户播放记录
export function user_record(uid , type){
    return request({
        url:"/user/record",
        withCredentials: true,
        params:{
           uid,
           type
        }
    })
}
//获取每日推荐歌单 ( 需要登录 )
export function recommend_resource(){
    return request({
        url:'/recommend/resource',
        withCredentials: true,
    })
}
//获取每日推荐歌曲 ( 需要登录 )
export function recommend_songs(){
    return request({
        url:'/recommend/songs',
        withCredentials: true,
    })
}
//国家编码列表
export function code_list(){
    return request({
        withCredentials: true,
        url: '/countries/code/list',
    })
}
//获取歌手详情
export function artist_detail(id){
    return request({
        withCredentials: true,
        url:"/artist/detail",
        params:{
            id
        }
    })
}
//获取用户电台
export function user_dj(uid){
    return request({
        withCredentials: true,
        url:"/user/dj",
        params:{
            uid
        }
    })
}
//用户电台
export function user_audio(uid){
    return request({
        withCredentials: true,
        url:"/user/audio",
        params:{
            uid
        }
    })
}

export function msg_private(limit  , offset  ){
    return request({
        withCredentials: true, 
        url:"/msg/private",
        params:{
            limit,
            offset
        }
    })
}
//获取用户等级信息
export function user_level(){
    return request({
        withCredentials: true, 
        url:"/user/level" , 
    })
}